import React from 'react';
import { useQuery, gql } from '@apollo/client';

const AccountListGql = gql`
    query AccountList { # 定义查询方法(浏览器上显示的)
        accountList { # 定义与后端对接的方法名
            id
            username
            password
        }
    }
`;

export const Page1: React.FC = () => {
    const { loading, error, data } = useQuery(AccountListGql);
    console.log(loading);
    console.log(error);
    console.log(data);
    return <div>测试查询数据</div>
}
